The Component Manager provides a routine that allows your application to retrieve the last error code that was generated by a component instance. Some component routines return error information as their function result. Other component routines set an error code that your application can retrieve using the GetComponentInstanceError function. Refer to the documentation supplied with the component for information on how that particular component handles errors.
The GetComponentInstanceError function returns the last error generated by a specific connection to a component.
FUNCTION GetComponentInstanceError
(aComponentInstance: ComponentInstance): OSErr;